<script setup>
import { useUserStore } from '@/stores'

const userStore = useUserStore()

const onClick = () => {
  uni.navigateTo({
    url: '/pagesUser/settings/settings',
  })
}
</script>

<template>
  <view class="my">
    <view>会员信息：{{ userStore.profile }}</view>
    <button
      @tap="
        userStore.setProfile({
          nickname: 'nick',
        })
      "
      size="mini"
      plain
      type="primary"
    >
      保存用户信息
    </button>
    <button @tap="userStore.clearProfile()" size="mini" plain type="warn">清理用户信息</button>

    <button type="primary" @click="onClick">设置（点击进入分包页面）</button>
  </view>
</template>

<style lang="scss">
//
</style>
